package org.jeecg.modules.basicCompartment.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.basicCompartment.entity.BasicCompartment;
import org.jeecg.modules.basicCompartment.mapper.BasicCompartmentMapper;
import org.jeecg.modules.basicCompartment.service.IBasicCompartmentService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 货格表
 * @Author: jeecg-boot
 * @Date:   2023-11-01
 * @Version: V1.0
 */
@Service
public class BasicCompartmentServiceImpl extends ServiceImpl<BasicCompartmentMapper, BasicCompartment> implements IBasicCompartmentService {

    @Override
    public BasicCompartment getByCompartmentCode(String compartmentCode) {
        LambdaQueryWrapper<BasicCompartment> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(BasicCompartment::getCompartmentCode, compartmentCode);
        return baseMapper.selectOne(wrapper);
    }
}
